from machine import Pin
import ds1302
from lib.config.index import sensor_config

ds1302_config = sensor_config.get_sensor("ds1302")
dio_pin = ds1302_config["dio"]
clk_pin = ds1302_config["clk"]
rst_pin = ds1302_config["rst"]
print("ds1302 config:", ds1302_config)

gpioclk = Pin(clk_pin, Pin.OUT, Pin.PULL_DOWN)
gpiorst = Pin(rst_pin, Pin.OUT, Pin.PULL_DOWN)
ds1302_obj = ds1302.DS1302(gpioclk, gpiorst, dio_pin)
print("start init ds1302")
